package org.example.service.impl;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.example.pojo.EmailPromotionParam;
import org.example.pojo.ReqBean;
import org.example.service.EmailPromotionService;
import org.example.utils.HttpRequestUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;


@Service
@RequiredArgsConstructor
@Slf4j
public class EmailPromotionServiceImpl implements EmailPromotionService {
private final HttpRequestUtil httpRequestUtil;
    //邮件推广
    @Override
    public Object adminPromotion(EmailPromotionParam emailPromotionParam) {
        //log.info("邮件推广参数:{}",emailPromotionParam);
        ReqBean<String> reqBean = new ReqBean<>();
        reqBean=  httpRequestUtil.postRequest("/email/promotion",emailPromotionParam, reqBean,ReqBean.class );
        return reqBean;
    }
}
